<?php

class Admin_Form_Changepassword extends Zend_Form {

    public function init() {
        $this->setMethod("post");

        #old password
        $old = new Zend_Form_Element_Password('old');
        $old->setLabel("Enter old password:")
                ->setRequired()
                ->addFilter("StringTrim")
                ->setAttribs(array('placeholder' => 'Enter old password'));

        #new password
        $new1 = new Zend_Form_Element_Password('new1');
        $new1->setLabel("Enter new password:")
                ->setRequired()
                ->addFilter("StringTrim")
                ->setAttribs(array('placeholder' => 'Enter new password'));

        #confirm password
        $new2 = new Zend_Form_Element_Password('new2');
        $new2->setLabel("Re-enter new password:")
                ->setRequired()
                ->addFilter("StringTrim")
                ->setAttribs(array('placeholder' => 'Re-enter new password'));

        #submit
        $submit = new Zend_Form_Element_Submit('submit');
        $submit->setLabel("Change Password")
                ->setAttribs(array('class' => 'btn btn-success'));

        $this->addElements(array($old, $new1, $new2, $submit));
    }

}

